<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>排名</title>
    <style type="text/css">
        table{
             width:100%
        }

        td {
            text-align:center;
        }
    </style>
</head>
<body>
<table>
    <tr>
        <th>股票代码</th>
        <th>股票名称</th>
        <th>价格<br>
            {{ end_date }}
        </th>
        <th>价格<br>
            {{ start_date }}
        </th>
        <th> 排名<br>{{ end_date }}</th>
        <th>排名<br>{{ start_date }}</th>
        <th>名次变化</th>
    </tr>
    {% for item in stock_rankings %}
    <tr>
        <td>{{ item.code }}</td>
        <td>{{ item.name}}</td>
        <td>
            {% if item.price_change > 0 %}
                <span style="color:red">&#8593;</span>
            {% elif item.price_change < 0%}
                <span style="color:green">&#8595;</span>
            {% endif%}
            {{ item.new_price }}</td>
        <td>{{ item.old_price }}</td>
        <td>{{ item.new_weight }}</td>
        <td>{{ item.old_weight }}</td>
        <td>
            {%if item.ranking is number%}
            {%if item.ranking >0 %}
            <span style="color:red">&#8593;</span>
            {% elif item.ranking <0 %}
            <span style="color:green">&#8595;</span>
            {% endif %}
            {{ item.ranking }}
            {%endif%}
        </td>
    </tr>
    {% endfor %}
</table>


</body>
</html>